<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
	.KEYW {color: #933;}
	.COMM {color: #bbb; font-style: italic;}
	.NUMB {color: #393;}
	.STRN {color: #393;}
	.REGX {color: #339;}
	.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
	</style></head><body><pre><span class='line'>  1</span> <span class="COMM">/**
<span class='line'>  2</span>  * @fileoverview &lt;code>BE&lt;/code> (BeforeEffects) aims to be a collection of
<span class='line'>  3</span>  * useful extensions to the After Effects Object Model within ExtendScript.
<span class='line'>  4</span>  * &lt;code>BE&lt;/code> contains Objects that provide greater functionality and
<span class='line'>  5</span>  * reusability than the built-in After Effects objects as well as additions to
<span class='line'>  6</span>  * the built-in Objects within JavaScript.
<span class='line'>  7</span>  * 
<span class='line'>  8</span>  * All prototype modifications to the built-in JavaScript Objects are handled
<span class='line'>  9</span>  * gently by checking to make sure the methods/properties that are added are
<span class='line'> 10</span>  * not already defined. This is helpful in that, if the standard Objects are
<span class='line'> 11</span>  * modified by future ECMA specifications (or ExtendScript is modified) and
<span class='line'> 12</span>  * they are named the same as methods/fields that &lt;code>BE&lt;/code> implements,
<span class='line'> 13</span>  * BeforeEffects will not overwrite the pre-defined methods. 
<span class='line'> 14</span>  * 
<span class='line'> 15</span>  * @author &lt;a href="mailto:collin.brooks@gmail.com">Collin Brooks&lt;/a>
<span class='line'> 16</span>  * @version 0.1.0 dev
<span class='line'> 17</span>  */</span><span class="WHIT">
<span class='line'> 18</span> 
<span class='line'> 19</span> </span><span class="COMM">/*jslint white: true, onevar: true, undef: true, newcap: true, regexp: true,
<span class='line'> 20</span>  plusplus: true, bitwise: true, maxerr: 50, maxlen: 79, indent: 4 */</span><span class="WHIT">
<span class='line'> 21</span> 
<span class='line'> 22</span> </span><span class="COMM">/**
<span class='line'> 23</span>  * The &lt;code>BE&lt;/code> Object aims to be an all-purpose collection of useful
<span class='line'> 24</span>  * methods that increases efficiency in creating scripts for After Effects.
<span class='line'> 25</span>  * 
<span class='line'> 26</span>  * @returns {Object} The &lt;code>BE&lt;/code> Object
<span class='line'> 27</span>  * @version 0.1.0 dev
<span class='line'> 28</span>  * @namespace
<span class='line'> 29</span>  */</span><span class="WHIT">
<span class='line'> 30</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">BE</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 31</span> </span><span class="WHIT">    </span><span class="COMM">/*************************************************************************\
<span class='line'> 32</span>      * >>> Private Variables
<span class='line'> 33</span>      * All private variables end with a _ except for 'that'
<span class='line'> 34</span>     \*************************************************************************/</span><span class="WHIT">
<span class='line'> 35</span> </span><span class="WHIT">	
<span class='line'> 36</span>     </span><span class="COMM">/**
<span class='line'> 37</span>      * A reference to this function's &lt;code>this&lt;/code> value for use within
<span class='line'> 38</span>      * methods/functions defined by the &lt;code>BE&lt;/code> Object.
<span class='line'> 39</span>      * 
<span class='line'> 40</span>      * @type {Object}
<span class='line'> 41</span>      * @inner
<span class='line'> 42</span>      * @private
<span class='line'> 43</span>      */</span><span class="WHIT">
<span class='line'> 44</span> </span><span class="WHIT">    
<span class='line'> 45</span>     </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">that</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 46</span> 
<span class='line'> 47</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'> 48</span>      * The current version of the &lt;code>BE&lt;/code> object.
<span class='line'> 49</span> 	 *
<span class='line'> 50</span> 	 * @type {String}
<span class='line'> 51</span> 	 * @private
<span class='line'> 52</span>      * @inner
<span class='line'> 53</span> 	 */</span><span class="WHIT">
<span class='line'> 54</span> </span><span class="WHIT">	</span><span class="NAME">version_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"0.1.0 dev"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 55</span> 
<span class='line'> 56</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 57</span> 	 * &lt;p>The current debug level. Each level builds upon the previous
<span class='line'> 58</span> 	 * level. Errors are automatically output to the log. Possible values:
<span class='line'> 59</span> 	 * &lt;ul>
<span class='line'> 60</span> 	 * &lt;li>0 - No information output to console&lt;/li>
<span class='line'> 61</span> 	 * &lt;li>1 - Info output to the console&lt;/li>
<span class='line'> 62</span> 	 * &lt;li>2 - Warnings and Info output to the console&lt;/li>
<span class='line'> 63</span> 	 * &lt;/ul>
<span class='line'> 64</span> 	 * &lt;/p>
<span class='line'> 65</span> 	 * @type {Number}
<span class='line'> 66</span>      * @private
<span class='line'> 67</span>      * @inner
<span class='line'> 68</span> 	 */</span><span class="WHIT">
<span class='line'> 69</span> </span><span class="WHIT">	</span><span class="NAME">debug_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">3</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 70</span> 
<span class='line'> 71</span> 
<span class='line'> 72</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'> 73</span>      * Contains the defined dependencies defined from BE.require()
<span class='line'> 74</span>      * @private
<span class='line'> 75</span>      * @type {Object}
<span class='line'> 76</span>      */</span><span class="WHIT">
<span class='line'> 77</span> </span><span class="WHIT">    </span><span class="NAME">dependencies_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 78</span> </span><span class="WHIT">        </span><span class="COMM">/**
<span class='line'> 79</span>          * An array of object notation strings of the objects whos files have
<span class='line'> 80</span>          * at leasts been visited. Recording this allows us to not end up in an
<span class='line'> 81</span>          * infinite loop when requiring a file that requires the current file.
<span class='line'> 82</span>          * @type {String[]}
<span class='line'> 83</span>          */</span><span class="WHIT">
<span class='line'> 84</span> </span><span class="WHIT">        </span><span class="NAME">visited</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 85</span> </span><span class="WHIT">        </span><span class="COMM">/**
<span class='line'> 86</span>          * An array of includes that have already been required. This helps
<span class='line'> 87</span>          * make sure a module does not define a resource more than once.
<span class='line'> 88</span>          * @type {String[]}
<span class='line'> 89</span>          */</span><span class="WHIT">
<span class='line'> 90</span> </span><span class="WHIT">        </span><span class="NAME">included</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="WHIT">
<span class='line'> 91</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 92</span> 
<span class='line'> 93</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'> 94</span>      * Defines methods or properties of the given object path if they do not
<span class='line'> 95</span>      * exist.
<span class='line'> 96</span>      *
<span class='line'> 97</span>      * @param {String} path The object structure path to create 
<span class='line'> 98</span>      * @param {*} [obj=BE] The object to base the object structure in. This is
<span class='line'> 99</span>      * useful if you want to specify an object path where the generated object
<span class='line'>100</span>      * path should be rooted. Defaults to BE.
<span class='line'>101</span>      * @returns {Object} The last object mentioned within the path.
<span class='line'>102</span>      * @example
<span class='line'>103</span>      * //Creates namespace structure and 
<span class='line'>104</span>      * //returns property1 
<span class='line'>105</span>      * BE.exportPath("BE.obj1.obj2.property1") 
<span class='line'>106</span>      */</span><span class="WHIT">
<span class='line'>107</span> </span><span class="WHIT">    </span><span class="NAME">exportPath_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">path</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>108</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">parts</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">path.split</span><span class="PUNC">(</span><span class="STRN">'.'</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>109</span> </span><span class="WHIT">            </span><span class="NAME">parent</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">that</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>110</span> </span><span class="WHIT">            </span><span class="NAME">i</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">max</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>111</span> 
<span class='line'>112</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">parts</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"BE"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>113</span> </span><span class="WHIT">            </span><span class="NAME">parts</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">parts.slice</span><span class="PUNC">(</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>114</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>115</span> 
<span class='line'>116</span> </span><span class="WHIT">        </span><span class="NAME">max</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">parts.length</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>117</span> 
<span class='line'>118</span> </span><span class="WHIT">        </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">max</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>119</span> </span><span class="WHIT">            </span><span class="COMM">//Create the property if it doesn't exist</span><span class="WHIT">
<span class='line'>120</span> </span><span class="WHIT">            </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">that.isDef</span><span class="PUNC">(</span><span class="NAME">parent</span><span class="PUNC">[</span><span class="NAME">parts</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>121</span> </span><span class="WHIT">                </span><span class="NAME">parent</span><span class="PUNC">[</span><span class="NAME">parts</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>122</span> </span><span class="WHIT">            </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>123</span> </span><span class="WHIT">            </span><span class="NAME">parent</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">parent</span><span class="PUNC">[</span><span class="NAME">parts</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>124</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>125</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">parent</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>126</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>127</span> </span><span class="WHIT">    
<span class='line'>128</span>     </span><span class="COMM">/*************************************************************************\
<span class='line'>129</span>      * >>> Public Properties:
<span class='line'>130</span>     \*************************************************************************/</span><span class="WHIT">
<span class='line'>131</span> 
<span class='line'>132</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>133</span>      * The base folder of the beforeeffects.jsx file relative to this file with
<span class='line'>134</span>      * no trailing slash.
<span class='line'>135</span>      * @type {String}
<span class='line'>136</span>      */</span><span class="WHIT">
<span class='line'>137</span> </span><span class="WHIT">    </span><span class="NAME">this.BASE_PATH</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Folder</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">File</span><span class="PUNC">(</span><span class="NAME">$.fileName</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">parent.fsName</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">fsName</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>138</span> </span><span class="WHIT">    
<span class='line'>139</span> 
<span class='line'>140</span> 	</span><span class="COMM">/*************************************************************************\
<span class='line'>141</span> 	* >>> Public Methods
<span class='line'>142</span> 	\*************************************************************************/</span><span class="WHIT">
<span class='line'>143</span> 
<span class='line'>144</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>145</span>      * Imports the module defined by the given name path if it has not already
<span class='line'>146</span>      * been defined; If the module cannot be found, an exception is raised.
<span class='line'>147</span>      * @param {String} name The path to the module using object path notation
<span class='line'>148</span>      * to drill down to the desired module's script. Uses the
<span class='line'>149</span>      * {@link BE.BASE_PATH} as the root for the search.
<span class='line'>150</span>      * @example
<span class='line'>151</span>      * BE.require("BE.proj"); //runs proj/proj.jsxinc
<span class='line'>152</span>      */</span><span class="WHIT">
<span class='line'>153</span> </span><span class="WHIT">    </span><span class="NAME">this.require</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">name</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>154</span> 
<span class='line'>155</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">log</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">that.log</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>156</span> 
<span class='line'>157</span> </span><span class="WHIT">        </span><span class="NAME">log.debug</span><span class="PUNC">(</span><span class="STRN">'Requiring '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">name</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>158</span> 
<span class='line'>159</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">dependencies_.visited</span><span class="PUNC">[</span><span class="NAME">name</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>160</span> </span><span class="WHIT">            </span><span class="NAME">log.debug</span><span class="PUNC">(</span><span class="STRN">'Already visited!'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>161</span> </span><span class="WHIT">            </span><span class="COMM">//No need to run the module because it has already been visited</span><span class="WHIT">
<span class='line'>162</span> </span><span class="WHIT">            </span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>163</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>164</span> 
<span class='line'>165</span> </span><span class="WHIT">        </span><span class="COMM">//Add the name path to the list of scripts that have been visited in</span><span class="WHIT">
<span class='line'>166</span> </span><span class="WHIT">        </span><span class="COMM">//order to circumvent any infinite loops in the requires.</span><span class="WHIT">
<span class='line'>167</span> </span><span class="WHIT">        </span><span class="NAME">dependencies_.visited</span><span class="PUNC">[</span><span class="NAME">name</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>168</span> 
<span class='line'>169</span> </span><span class="WHIT">        </span><span class="COMM">//Run the script that correlates with the provided name</span><span class="WHIT">
<span class='line'>170</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">dependencies_.included</span><span class="PUNC">[</span><span class="NAME">name</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>171</span> </span><span class="WHIT">            </span><span class="COMM">//Evaluate the script</span><span class="WHIT">
<span class='line'>172</span> </span><span class="WHIT">            </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">that.runScript</span><span class="PUNC">(</span><span class="NAME">that.nameToPath</span><span class="PUNC">(</span><span class="NAME">name</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>173</span> </span><span class="WHIT">                </span><span class="COMM">//Mark the module as being included.</span><span class="WHIT">
<span class='line'>174</span> </span><span class="WHIT">                </span><span class="NAME">dependencies_.included</span><span class="PUNC">[</span><span class="NAME">name</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>175</span> </span><span class="WHIT">                </span><span class="NAME">log.debug</span><span class="PUNC">(</span><span class="STRN">'Require of '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">' successfull!'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>176</span> 
<span class='line'>177</span> </span><span class="WHIT">                </span><span class="COMM">//Our work is done here.</span><span class="WHIT">
<span class='line'>178</span> </span><span class="WHIT">                </span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>179</span> </span><span class="WHIT">            </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>180</span> </span><span class="WHIT">                </span><span class="COMM">//Mark the file as not visited so the user can check the error</span><span class="WHIT">
<span class='line'>181</span> </span><span class="WHIT">                </span><span class="COMM">//and retry.</span><span class="WHIT">
<span class='line'>182</span> </span><span class="WHIT">                </span><span class="NAME">dependencies_.visited</span><span class="PUNC">[</span><span class="NAME">name</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>183</span> </span><span class="WHIT">                </span><span class="NAME">log.error</span><span class="PUNC">(</span><span class="STRN">'Error in requiring '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">name</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>184</span> </span><span class="WHIT">            </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>185</span> </span><span class="WHIT">            
<span class='line'>186</span>         </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>187</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>188</span> 
<span class='line'>189</span> 
<span class='line'>190</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>191</span>      * Provides an object structure without overwriting already defined
<span class='line'>192</span>      * namespaces, methods or properties.
<span class='line'>193</span>      * @param {String} name The name of the object to define.
<span class='line'>194</span>      * @returns {Object} The last object in the path.
<span class='line'>195</span>      * @example
<span class='line'>196</span>      * &lt;code>BE.provide("BE.my.long.object.path");&lt;/code>
<span class='line'>197</span>      * same as:
<span class='line'>198</span>      * &lt;code>BE = { my: { long: { object: { path: {}}}}};&lt;/code>
<span class='line'>199</span>      */</span><span class="WHIT">
<span class='line'>200</span> </span><span class="WHIT">    </span><span class="NAME">this.provide</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">name</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>201</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">exportPath_</span><span class="PUNC">(</span><span class="NAME">name</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>202</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>203</span> 
<span class='line'>204</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>205</span>      * Evaluates the script that resides at the given file path relative to the
<span class='line'>206</span>      * {@link BE.BASE_PATH}.
<span class='line'>207</span>      * &lt;p>
<span class='line'>208</span>      * NOTE: This method does not check to see if the file has already been
<span class='line'>209</span>      * evaluated.
<span class='line'>210</span>      * @param {String} path The file path for the script to be run.
<span class='line'>211</span>      * @returns {Boolean} True if the file was succesfully evaluated, false if
<span class='line'>212</span>      * it wasn't.
<span class='line'>213</span>      * @example
<span class='line'>214</span>      * BE.runScript("comp/comp.jsxinc"); //runs BE.BASE_PATH/comp/comp.jsx
<span class='line'>215</span>      * }
<span class='line'>216</span>      */</span><span class="WHIT">
<span class='line'>217</span> </span><span class="WHIT">    </span><span class="NAME">this.runScript</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">path</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>218</span> </span><span class="WHIT">        </span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>219</span> </span><span class="WHIT">            </span><span class="NAME">$.evalFile</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">File</span><span class="PUNC">(</span><span class="NAME">that.BASE_PATH</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"/"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">path</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>220</span> 
<span class='line'>221</span> </span><span class="WHIT">            </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>222</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>223</span> </span><span class="WHIT">            </span><span class="NAME">that.alertError</span><span class="PUNC">(</span><span class="STRN">"There was an error while evaluating the "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
<span class='line'>224</span> </span><span class="WHIT">            </span><span class="STRN">"script at "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">path</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">".\n\nERROR:\n"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">e</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>225</span> 
<span class='line'>226</span> </span><span class="WHIT">            </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>227</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>228</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>229</span> 
<span class='line'>230</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>231</span>      * Takes a name in object notation and returns the file path to the script
<span class='line'>232</span>      * that defines the object relative to the {@link BE.BASE_PATH} without the
<span class='line'>233</span>      * / prefix.
<span class='line'>234</span>      * @param {String} name The name of the object to return the file path for.
<span class='line'>235</span>      * @returns {String} The relative file path where the object with the given
<span class='line'>236</span>      * name is defined.
<span class='line'>237</span>      * @example
<span class='line'>238</span>      * BE.nameToPath('BE.comp'); //returns comp/comp.jsxinc
<span class='line'>239</span>      */</span><span class="WHIT">
<span class='line'>240</span> </span><span class="WHIT">    </span><span class="NAME">this.nameToPath</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">name</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>241</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">parts</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">name.split</span><span class="PUNC">(</span><span class="STRN">'.'</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>242</span> </span><span class="WHIT">            </span><span class="NAME">i</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">max</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">path</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>243</span> </span><span class="WHIT">            </span><span class="NAME">log</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">that.log</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>244</span> 
<span class='line'>245</span> </span><span class="WHIT">        </span><span class="NAME">log.debug</span><span class="PUNC">(</span><span class="STRN">'nameToPath('</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">')'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>246</span> </span><span class="WHIT">        </span><span class="COMM">//Does this name start with 'BE'? If so, get rid of it.</span><span class="WHIT">
<span class='line'>247</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">parts</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">'BE'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>248</span> </span><span class="WHIT">            </span><span class="NAME">parts</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">parts.slice</span><span class="PUNC">(</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>249</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>250</span> 
<span class='line'>251</span> </span><span class="WHIT">        </span><span class="COMM">//The last part of the name is the name to use for the file to import.</span><span class="WHIT">
<span class='line'>252</span> </span><span class="WHIT">        </span><span class="COMM">//Every other part should correlate with the folder structure that is</span><span class="WHIT">
<span class='line'>253</span> </span><span class="WHIT">        </span><span class="COMM">//in the same folder as the beforeeffects.jsx script.</span><span class="WHIT">
<span class='line'>254</span> </span><span class="WHIT">        </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">max</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">parts.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">max</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>255</span> </span><span class="WHIT">            </span><span class="NAME">path</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">parts</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'/'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>256</span> 
<span class='line'>257</span> </span><span class="WHIT">            </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">max</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>258</span> </span><span class="WHIT">                </span><span class="NAME">path</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">parts</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'.jsxinc'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>259</span> </span><span class="WHIT">            </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>260</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>261</span> 
<span class='line'>262</span> </span><span class="WHIT">        </span><span class="NAME">log.debug</span><span class="PUNC">(</span><span class="STRN">'returning: '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">path</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>263</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">path</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>264</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>265</span> 
<span class='line'>266</span> 
<span class='line'>267</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>268</span>      * Returns true if the specified value is not |undefined|.
<span class='line'>269</span>      * &lt;p>
<span class='line'>270</span>      * WARNING: Do not use this to test if an object has a property. Use the
<span class='line'>271</span>      * &lt;code>in&lt;/code> operator instead.  Additionally, this function assumes
<span class='line'>272</span>      * that the global &lt;code>undefined&lt;/code> variable has not been redefined.
<span class='line'>273</span>      * &lt;/p>
<span class='line'>274</span>      * @param {*} val Variable to test.
<span class='line'>275</span>      * @returns {boolean} Whether variable is defined.
<span class='line'>276</span>      * @example
<span class='line'>277</span>      * var x;
<span class='line'>278</span>      * BE.isDef(x); //false
<span class='line'>279</span>      * x = 1;
<span class='line'>280</span>      * BE.isDef(x); //true
<span class='line'>281</span>      *
<span class='line'>282</span>      * //To check if a object has a property use this instead:
<span class='line'>283</span>      * var x.blah = 1;
<span class='line'>284</span>      * "blah" in x; //true
<span class='line'>285</span>      * "bam" in x; //false
<span class='line'>286</span>      */</span><span class="WHIT">
<span class='line'>287</span> </span><span class="WHIT">    </span><span class="NAME">this.isDef</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">val</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>288</span> </span><span class="WHIT">      </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">val</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>289</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>290</span> 
<span class='line'>291</span> 
<span class='line'>292</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>293</span>      * Returns true if the specified value is truly |null|.
<span class='line'>294</span>      * &lt;p>
<span class='line'>295</span>      * NOTE: There are a couple
<span class='line'>296</span>      * of things to look out for when working with null values:
<span class='line'>297</span>      * &lt;ul>
<span class='line'>298</span>      * &lt;li>&lt;code>typeof null&lt;/code> returns '&lt;code>object&lt;/code>' instead of
<span class='line'>299</span>      * '&lt;code>null&lt;/code>'.&lt;/li>
<span class='line'>300</span>      * &lt;li>&lt;code>null == undefined&lt;/coe> returns &lt;code>true&lt;/code>&lt;/li>
<span class='line'>301</span>      * &lt;/ul>
<span class='line'>302</span>      * &lt;/p>
<span class='line'>303</span>      *
<span class='line'>304</span>      * @param {*} val Variable to test.
<span class='line'>305</span>      * @returns {boolean} Whether variable is null.
<span class='line'>306</span>      * @example
<span class='line'>307</span>      * var x;
<span class='line'>308</span>      * BE.isNull(x); //true
<span class='line'>309</span>      * !BE.isNull(x); //false
<span class='line'>310</span>      */</span><span class="WHIT">
<span class='line'>311</span> </span><span class="WHIT">    </span><span class="NAME">this.isNull</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">val</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>312</span> </span><span class="WHIT">      </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">val</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>313</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>314</span> 
<span class='line'>315</span> 
<span class='line'>316</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>317</span>      * Returns true if the specified value is defined and not null.
<span class='line'>318</span>      *
<span class='line'>319</span>      * &lt;p>
<span class='line'>320</span>      * NOTE: &lt;code>undefined == null&lt;/code> is &lt;code>true&lt;/code> but
<span class='line'>321</span>      * &lt;code>undefined === null&lt;/code> is &lt;code>false&lt;/code>.
<span class='line'>322</span>      * &lt;/p>
<span class='line'>323</span>      * @param {*} val Variable to test.
<span class='line'>324</span>      * @returns {boolean} Whether variable is defined and not null.
<span class='line'>325</span>      * @example
<span class='line'>326</span>      * var x = null;
<span class='line'>327</span>      * BE.isDefAndNotNull(x); //false
<span class='line'>328</span>      * x = "I like cake";
<span class='line'>329</span>      * BE.isDefAndNotNull(x); //true
<span class='line'>330</span>      */</span><span class="WHIT">
<span class='line'>331</span> </span><span class="WHIT">    </span><span class="NAME">this.isDefAndNotNull</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">val</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>332</span> </span><span class="WHIT">      </span><span class="COMM">// Note that undefined == null.</span><span class="WHIT">
<span class='line'>333</span> </span><span class="WHIT">      </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">val</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>334</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>335</span> </span><span class="WHIT">    
<span class='line'>336</span> 
<span class='line'>337</span>     </span><span class="COMM">/**
<span class='line'>338</span>      * Returns true if the specified value is a string
<span class='line'>339</span>      * @param {*} val Variable to test.
<span class='line'>340</span>      * @returns {boolean} Whether variable is a string.
<span class='line'>341</span>      * @example
<span class='line'>342</span>      * var x = "howdy";
<span class='line'>343</span>      * BE.isString(x); //true
<span class='line'>344</span>      */</span><span class="WHIT">
<span class='line'>345</span> </span><span class="WHIT">    </span><span class="NAME">this.isString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">val</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>346</span> </span><span class="WHIT">      </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">val</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">'string'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>347</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>348</span> 
<span class='line'>349</span> 
<span class='line'>350</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>351</span>      * Returns true if the specified value is a boolean
<span class='line'>352</span>      * @param {*} val Variable to test.
<span class='line'>353</span>      * @returns {boolean} Whether variable is boolean.
<span class='line'>354</span>      * @example
<span class='line'>355</span>      * var x = false;
<span class='line'>356</span>      * BE.isBoolean(x); //true
<span class='line'>357</span>      */</span><span class="WHIT">
<span class='line'>358</span> </span><span class="WHIT">    </span><span class="NAME">this.isBoolean</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">val</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>359</span> </span><span class="WHIT">      </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">val</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">'boolean'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>360</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>361</span> 
<span class='line'>362</span> 
<span class='line'>363</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>364</span>      * Returns true if the specified value is a number
<span class='line'>365</span>      * @param {*} val Variable to test.
<span class='line'>366</span>      * @returns {boolean} Whether variable is a number.
<span class='line'>367</span>      */</span><span class="WHIT">
<span class='line'>368</span> </span><span class="WHIT">    </span><span class="NAME">this.isNumber</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">val</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>369</span> </span><span class="WHIT">      </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">val</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">'number'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>370</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>371</span> 
<span class='line'>372</span> 
<span class='line'>373</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>374</span>      * Returns true if the specified value is a function.
<span class='line'>375</span>      * @param {*} val Variable to test.
<span class='line'>376</span>      * @returns {boolean} Whether variable is a function.
<span class='line'>377</span>      */</span><span class="WHIT">
<span class='line'>378</span> </span><span class="WHIT">    </span><span class="NAME">this.isFunc</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">val</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>379</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="PUNC">(</span><span class="NAME">val</span><span class="WHIT"> </span><span class="KEYW">instanceof</span><span class="WHIT"> </span><span class="NAME">Object</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
<span class='line'>380</span> </span><span class="WHIT">            </span><span class="PUNC">(</span><span class="NAME">Object.prototype.toString.call</span><span class="PUNC">(</span><span class="WHIT">
<span class='line'>381</span> </span><span class="WHIT">            </span><span class="COMM">/** @type {Object} */</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">val</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">'[object Function]'</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT">
<span class='line'>382</span> </span><span class="WHIT">            </span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">val.call</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="STRN">'undefined'</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
<span class='line'>383</span> </span><span class="WHIT">            </span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">val.propertyIsEnumerable</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="STRN">'undefined'</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
<span class='line'>384</span> </span><span class="WHIT">            </span><span class="PUNC">!</span><span class="NAME">val.propertyIsEnumerable</span><span class="PUNC">(</span><span class="STRN">'call'</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>385</span> 
<span class='line'>386</span> </span><span class="WHIT">            </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>387</span> 
<span class='line'>388</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>389</span> </span><span class="WHIT">            </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>390</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>391</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>392</span> </span><span class="WHIT">    
<span class='line'>393</span>     
<span class='line'>394</span>     </span><span class="COMM">/**
<span class='line'>395</span>      * Copies all the members of a source object to a target object. WARNING:
<span class='line'>396</span>      * This includes items that aren't 'own' items!
<span class='line'>397</span>      * @param {Object} target Target.
<span class='line'>398</span>      * @param {Object} source Source.
<span class='line'>399</span>      */</span><span class="WHIT">
<span class='line'>400</span> </span><span class="WHIT">    </span><span class="NAME">this.mixin</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">target</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">source</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>401</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">x</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>402</span> </span><span class="WHIT">        </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">x</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">source</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>403</span> </span><span class="WHIT">            </span><span class="NAME">target</span><span class="PUNC">[</span><span class="NAME">x</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">source</span><span class="PUNC">[</span><span class="NAME">x</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>404</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>405</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>406</span> 
<span class='line'>407</span> 
<span class='line'>408</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>409</span>      * Contains methods that help with debugging a script
<span class='line'>410</span> 	 * @memberOf BE
<span class='line'>411</span> 	 * @namespace
<span class='line'>412</span>      */</span><span class="WHIT">
<span class='line'>413</span> </span><span class="WHIT">    </span><span class="NAME">this.log</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>414</span> 
<span class='line'>415</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>416</span> 	 * Log message type contstants. Values:
<span class='line'>417</span>      * &lt;ul>
<span class='line'>418</span>      * &lt;li>EXCEPTION&lt;/li>
<span class='line'>419</span>      * &lt;li>WARN&lt;/li>
<span class='line'>420</span>      * &lt;li>DEBUG&lt;/li>
<span class='line'>421</span>      * &lt;/ul>
<span class='line'>422</span>      * @constant
<span class='line'>423</span>      * @see BE.log
<span class='line'>424</span> 	 */</span><span class="WHIT">
<span class='line'>425</span> </span><span class="WHIT">	</span><span class="NAME">this.log.types</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>426</span> </span><span class="WHIT">		</span><span class="NAME">EXCEPTION</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"FATAL ERROR: "</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>427</span> </span><span class="WHIT">		</span><span class="NAME">WARN</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"WARNING: "</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>428</span> </span><span class="WHIT">        </span><span class="NAME">DEBUG</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"INFO: "</span><span class="WHIT">
<span class='line'>429</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>430</span> 
<span class='line'>431</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>432</span>      * Writes a message out to the ExtendScript console. The individual
<span class='line'>433</span>      * &lt;code>BE.log.debug&lt;/code>, &lt;code>BE.log.warn&lt;/code> and
<span class='line'>434</span>      * &lt;code>BE.log.error&lt;/code> can be used as short forms for the
<span class='line'>435</span>      * functionality of this method.
<span class='line'>436</span>      *
<span class='line'>437</span>      * @example 
<span class='line'>438</span>      * BE.log.write(BE.log.types.DEBUG, 'This is a debug message');
<span class='line'>439</span>      * @param {BE.log.types} type The &lt;code>BE.log.type&lt;/code> to use for this
<span class='line'>440</span>      * log message
<span class='line'>441</span>      * @param {String} message The message to log
<span class='line'>442</span> 	 */</span><span class="WHIT">
<span class='line'>443</span> </span><span class="WHIT">    </span><span class="NAME">this.log.write</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">type</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">message</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>444</span> </span><span class="WHIT">		</span><span class="COMM">//Make sure the debug level is at least one greater than zero.</span><span class="WHIT">
<span class='line'>445</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">debug_</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>446</span> </span><span class="WHIT">            </span><span class="KEYW">switch</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">type</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>447</span> </span><span class="WHIT">            </span><span class="KEYW">case</span><span class="WHIT"> </span><span class="NAME">that.log.types.DEBUG</span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>448</span> </span><span class="WHIT">                </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">debug_</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>449</span> </span><span class="WHIT">                    </span><span class="NAME">$.writeln</span><span class="PUNC">(</span><span class="NAME">type</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">message</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>450</span> </span><span class="WHIT">                </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>451</span> </span><span class="WHIT">                </span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>452</span> </span><span class="WHIT">            </span><span class="KEYW">case</span><span class="WHIT"> </span><span class="NAME">that.log.types.WARN</span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>453</span> </span><span class="WHIT">                </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">debug_</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>454</span> </span><span class="WHIT">                    </span><span class="NAME">$.writeln</span><span class="PUNC">(</span><span class="NAME">type</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">message</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>455</span> </span><span class="WHIT">                </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>456</span> </span><span class="WHIT">                </span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>457</span> </span><span class="WHIT">            </span><span class="KEYW">case</span><span class="WHIT"> </span><span class="NAME">that.log.types.EXCEPTION</span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>458</span> </span><span class="WHIT">                </span><span class="NAME">$.writeln</span><span class="PUNC">(</span><span class="NAME">type</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">message</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>459</span> </span><span class="WHIT">                </span><span class="NAME">that.alertError</span><span class="PUNC">(</span><span class="STRN">""</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">type</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">message</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>460</span> </span><span class="WHIT">                </span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>461</span> </span><span class="WHIT">            </span><span class="KEYW">default</span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>462</span> </span><span class="WHIT">                </span><span class="NAME">$.writeln</span><span class="PUNC">(</span><span class="STRN">"INCORRECT ERROR TYPE SENT!"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>463</span> </span><span class="WHIT">                </span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>464</span> </span><span class="WHIT">            </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>465</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>466</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>467</span> 
<span class='line'>468</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>469</span>      * Outputs a warning message to the ExtendScript Toolkit console.
<span class='line'>470</span>      * @param {String} message The message to display
<span class='line'>471</span>      */</span><span class="WHIT">
<span class='line'>472</span> </span><span class="WHIT">    </span><span class="NAME">this.log.warn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">message</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>473</span> </span><span class="WHIT">        </span><span class="NAME">that.log.write</span><span class="PUNC">(</span><span class="NAME">that.log.types.WARN</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">message</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>474</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>475</span> 
<span class='line'>476</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>477</span>      * Outputs an info message to the ExtendScript Toolkit console.
<span class='line'>478</span>      * @param {String} message The message to display.
<span class='line'>479</span>      */</span><span class="WHIT">
<span class='line'>480</span> </span><span class="WHIT">    </span><span class="NAME">this.log.debug</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">message</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>481</span> </span><span class="WHIT">        </span><span class="NAME">that.log.write</span><span class="PUNC">(</span><span class="NAME">that.log.types.DEBUG</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">message</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>482</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>483</span> 
<span class='line'>484</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>485</span>      * Outputs an error message to the ExtendScript Toolkit console.
<span class='line'>486</span>      * @param {Error} e The error to output.
<span class='line'>487</span>      */</span><span class="WHIT">
<span class='line'>488</span> </span><span class="WHIT">    </span><span class="NAME">this.log.error</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>489</span> </span><span class="WHIT">        </span><span class="NAME">that.log.write</span><span class="PUNC">(</span><span class="NAME">that.log.types.EXCEPTION</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">e.toString</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>490</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>491</span> 
<span class='line'>492</span> 
<span class='line'>493</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>494</span>      * Enters in a header message that visibly separates logs written by a
<span class='line'>495</span>      * specified script.
<span class='line'>496</span>      * @example
<span class='line'>497</span>      *      BE.log.insertLogStart('myfilename.jsx');
<span class='line'>498</span>      *      //Ouput:
<span class='line'>499</span>      *      ----------------
<span class='line'>500</span>      *      myfilename.jsx
<span class='line'>501</span>      *      &lt;CURRENT DATE HERE>
<span class='line'>502</span>      *      ----------------
<span class='line'>503</span>      * @param {String} s The name of the script to mention in the log start
<span class='line'>504</span>      * @returns Nothing.
<span class='line'>505</span>      */</span><span class="WHIT">
<span class='line'>506</span> </span><span class="WHIT">    </span><span class="NAME">this.log.insertLogStart</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">s</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>507</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">d</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Date</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>508</span> </span><span class="WHIT">            </span><span class="NAME">m</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"----------------\n"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
<span class='line'>509</span> </span><span class="WHIT">               </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"\n"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
<span class='line'>510</span> </span><span class="WHIT">               </span><span class="NAME">d.toString</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"\n"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
<span class='line'>511</span> </span><span class="WHIT">               </span><span class="STRN">"----------------"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>512</span> </span><span class="WHIT">        </span><span class="NAME">$.writeln</span><span class="PUNC">(</span><span class="NAME">m</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>513</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>514</span> 
<span class='line'>515</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>516</span>      * Inserts a horizontal rule in the log to visually separate the info to be
<span class='line'>517</span>      * written to the log.
<span class='line'>518</span>      * @example
<span class='line'>519</span>      *  BE.log.separate(1, '+', 5);
<span class='line'>520</span>      *  //Output:
<span class='line'>521</span>      *  
<span class='line'>522</span>      *  +++++
<span class='line'>523</span>      *  
<span class='line'>524</span>      * @param {Array|Int} [padding = 0] &lt;p>One of two types of values can be
<span class='line'>525</span>      * sent as the parameter for this method. If you pass an Integer or a
<span class='line'>526</span>      * single value Array, that many lines will be added before and after the
<span class='line'>527</span>      * separator.&lt;/p>
<span class='line'>528</span>      * 
<span class='line'>529</span>      * &lt;p>If you pass a two value Array, i.e. [1,2], the Integer at position 0
<span class='line'>530</span>      * is used to determine how many blank lines to place above the separator
<span class='line'>531</span>      * and the Integer at position [1] is used to determine how many blank
<span class='line'>532</span>      * lines to place below the separator.&lt;/p>
<span class='line'>533</span>      * 
<span class='line'>534</span>      * &lt;p>If the Array sent has a length greater than 2, only the first two
<span class='line'>535</span>      * indices are used.&lt;/p>
<span class='line'>536</span>      * @param {String} [s="-"] The character to use as the separator.
<span class='line'>537</span>      * @param {Number} [n = 15] How many characters to place within the
<span class='line'>538</span>      * horizontal separator line.
<span class='line'>539</span>      */</span><span class="WHIT">
<span class='line'>540</span> </span><span class="WHIT">    </span><span class="NAME">this.log.separate</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">padding</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">s</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">n</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>541</span> 
<span class='line'>542</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">padBefore</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">padAfter</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">separatorString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">""</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>543</span> 
<span class='line'>544</span> </span><span class="WHIT">        </span><span class="NAME">padding</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">padding</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">padding</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>545</span> </span><span class="WHIT">        </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="STRN">"-"</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">s</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>546</span> </span><span class="WHIT">        </span><span class="NAME">n</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">n</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NUMB">15</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">n</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>547</span> 
<span class='line'>548</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">padding</span><span class="WHIT"> </span><span class="KEYW">instanceof</span><span class="WHIT"> </span><span class="NAME">Array</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>549</span> </span><span class="WHIT">            </span><span class="COMM">//How many dimensions?</span><span class="WHIT">
<span class='line'>550</span> </span><span class="WHIT">            </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">padding.length</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>551</span> </span><span class="WHIT">                </span><span class="NAME">padBefore</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">padAfter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">padding</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>552</span> </span><span class="WHIT">            </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">padding.length</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>553</span> </span><span class="WHIT">                </span><span class="NAME">padBefore</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">padding</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>554</span> </span><span class="WHIT">                </span><span class="NAME">padAfter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">padding</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>555</span> </span><span class="WHIT">            </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>556</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">padding</span><span class="WHIT"> </span><span class="KEYW">instanceof</span><span class="WHIT"> </span><span class="NAME">String</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>557</span> </span><span class="WHIT">            </span><span class="NAME">padBefore</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">padAfter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">parseInt</span><span class="PUNC">(</span><span class="NAME">padding</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">10</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>558</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>559</span> 
<span class='line'>560</span> </span><span class="WHIT">        </span><span class="COMM">//Output any padding before this separator</span><span class="WHIT">
<span class='line'>561</span> </span><span class="WHIT">        </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">padBefore</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>562</span> </span><span class="WHIT">            </span><span class="NAME">$.writeln</span><span class="PUNC">(</span><span class="STRN">""</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>563</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>564</span> 
<span class='line'>565</span> </span><span class="WHIT">        </span><span class="COMM">//Output the separator</span><span class="WHIT">
<span class='line'>566</span> </span><span class="WHIT">        </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">n</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>567</span> </span><span class="WHIT">            </span><span class="NAME">separatorString</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">s</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>568</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>569</span> 
<span class='line'>570</span> </span><span class="WHIT">        </span><span class="NAME">$.writeln</span><span class="PUNC">(</span><span class="NAME">separatorString</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>571</span> 
<span class='line'>572</span> </span><span class="WHIT">        </span><span class="COMM">//Output any padding after this separator</span><span class="WHIT">
<span class='line'>573</span> </span><span class="WHIT">        </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">padAfter</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>574</span> </span><span class="WHIT">            </span><span class="NAME">$.writeln</span><span class="PUNC">(</span><span class="STRN">""</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>575</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>576</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>577</span> 
<span class='line'>578</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>579</span> 	 * Set the debug level for the &lt;code>BE.log&lt;/code> method.
<span class='line'>580</span> 	 * 
<span class='line'>581</span> 	 * The following levels are available:
<span class='line'>582</span> 	 * &lt;ul>
<span class='line'>583</span> 	 *  &lt;li>0 - Debug completely off.&lt;/li>
<span class='line'>584</span> 	 *  &lt;li>1 - Information displayed.&lt;/li>
<span class='line'>585</span> 	 *  &lt;li>2 - Warnings shown.&lt;/li>
<span class='line'>586</span> 	 * &lt;/ul>
<span class='line'>587</span> 	 * 
<span class='line'>588</span>      * @param {Number} l The level number to set as the debug level.
<span class='line'>589</span> 	 * @example
<span class='line'>590</span>      * BE.setDebugLevel(1);
<span class='line'>591</span> 	 * @returns Nothing.
<span class='line'>592</span> 	 * @see BE.log
<span class='line'>593</span> 	 */</span><span class="WHIT">
<span class='line'>594</span> </span><span class="WHIT">	</span><span class="NAME">this.setDebugLevel</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">l</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>595</span> </span><span class="WHIT">		</span><span class="NAME">debug_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">l</span><span class="PUNC">;</span><span class="WHIT">	
<span class='line'>596</span> 	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>597</span> 
<span class='line'>598</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>599</span>      * Returns the version string of the current &lt;code>BE&lt;/code> Object.
<span class='line'>600</span>      * 
<span class='line'>601</span>      * @returns {String} The &lt;code>BE&lt;/code> Object's version string.
<span class='line'>602</span>      */</span><span class="WHIT">
<span class='line'>603</span> </span><span class="WHIT">    </span><span class="NAME">this.getVersion</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>604</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">version_</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>605</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>606</span> </span><span class="WHIT">    
<span class='line'>607</span>     </span><span class="COMM">/**
<span class='line'>608</span>      * Alerts an Error Object, OR a String error, to the user. If the error
<span class='line'>609</span> 	 * message is greater than a preset amount, the error is displayed in a
<span class='line'>610</span> 	 * scrollable window.
<span class='line'>611</span>      *
<span class='line'>612</span>      * @param {String|Error} e If the argument is a String, this variable will
<span class='line'>613</span>      * be used to alert the string to the user. If it is an Error, the fields
<span class='line'>614</span>      * within the Error will be used to alert the user.
<span class='line'>615</span>      * @return Nothing.
<span class='line'>616</span>      */</span><span class="WHIT">
<span class='line'>617</span> </span><span class="WHIT">    </span><span class="NAME">this.alertError</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>618</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">errString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">""</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>619</span> </span><span class="WHIT">            </span><span class="NAME">eWindow</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>620</span> </span><span class="WHIT">			</span><span class="NAME">errStringMaxLength</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">100</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>621</span> 
<span class='line'>622</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">e</span><span class="WHIT"> </span><span class="KEYW">instanceof</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>623</span> </span><span class="WHIT">			</span><span class="NAME">errString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">e.description</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>624</span> </span><span class="WHIT">			</span><span class="NAME">errString</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">e.fileName</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="STRN">"\n\nFile: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">e.fileName</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">""</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>625</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>626</span> </span><span class="WHIT">			</span><span class="NAME">errString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">e</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>627</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>628</span> 
<span class='line'>629</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">errString.length</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NAME">errStringMaxLength</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>630</span> </span><span class="WHIT">			</span><span class="NAME">eWindow</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Window</span><span class="PUNC">(</span><span class="STRN">"dialog"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>631</span> </span><span class="WHIT">					</span><span class="STRN">"Error!"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>632</span> </span><span class="WHIT">					</span><span class="NAME">undefined</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>633</span> </span><span class="WHIT">					</span><span class="PUNC">{</span><span class="NAME">resizeable</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>634</span> </span><span class="WHIT">					</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>635</span> 
<span class='line'>636</span> </span><span class="WHIT">			</span><span class="NAME">eWindow.grp</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">eWindow.add</span><span class="PUNC">(</span><span class="WHIT">
<span class='line'>637</span> </span><span class="WHIT">				</span><span class="STRN">"group { orientation: 'column', margins:0,"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
<span class='line'>638</span> </span><span class="WHIT">					</span><span class="STRN">"alignment: ['fill','fill'], size: [350, 450],"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
<span class='line'>639</span> </span><span class="WHIT">						</span><span class="STRN">"err: EditText {properties: {multiline:true},"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
<span class='line'>640</span> </span><span class="WHIT">						</span><span class="STRN">"alignment: ['fill', 'fill'],"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
<span class='line'>641</span> </span><span class="WHIT">							</span><span class="STRN">"size: [350,430]},"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
<span class='line'>642</span> </span><span class="WHIT">						</span><span class="STRN">"b: Button {text: 'Ok'}"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
<span class='line'>643</span> </span><span class="WHIT">				</span><span class="STRN">"}"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>644</span> 
<span class='line'>645</span> </span><span class="WHIT">			</span><span class="NAME">eWindow.grp.b.onClick</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>646</span> </span><span class="WHIT">				</span><span class="NAME">eWindow.close</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>647</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>648</span> 
<span class='line'>649</span> </span><span class="WHIT">			</span><span class="NAME">eWindow.center</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>650</span> </span><span class="WHIT">			</span><span class="NAME">eWindow.grp.err.text</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">errString</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>651</span> </span><span class="WHIT">			</span><span class="NAME">eWindow.show</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>652</span> 
<span class='line'>653</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>654</span> </span><span class="WHIT">		    </span><span class="NAME">alert</span><span class="PUNC">(</span><span class="NAME">errString</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>655</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>656</span> 
<span class='line'>657</span> </span><span class="WHIT">		</span><span class="NAME">that.log.warn</span><span class="PUNC">(</span><span class="NAME">errString</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>658</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>659</span> 
<span class='line'>660</span> </span><span class="WHIT">	</span><span class="COMM">/*************************************************************************\
<span class='line'>661</span> 	* >>> ERROR
<span class='line'>662</span> 	\*************************************************************************/</span><span class="WHIT">
<span class='line'>663</span> 
<span class='line'>664</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>665</span>      * Set of string error constants used by the global &lt;code>BE&lt;/code> Object.
<span class='line'>666</span> 	 * 
<span class='line'>667</span>      * The errors represented within this Object are not Error Objects; they
<span class='line'>668</span>      * are description strings.
<span class='line'>669</span> 	 * @namespace
<span class='line'>670</span>      * @constant
<span class='line'>671</span>      */</span><span class="WHIT">
<span class='line'>672</span> </span><span class="WHIT">    </span><span class="NAME">this.ERROR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>673</span> </span><span class="WHIT">		</span><span class="COMM">/**
<span class='line'>674</span> 		 * An error stating that there is no open After Effects
<span class='line'>675</span> 		 * project.
<span class='line'>676</span> 		 * @type {String}
<span class='line'>677</span> 		 */</span><span class="WHIT">
<span class='line'>678</span> </span><span class="WHIT">        </span><span class="NAME">NO_OPEN_PROJECT</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"An open project could not be found!"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>679</span> 
<span class='line'>680</span> </span><span class="WHIT">        </span><span class="COMM">/**
<span class='line'>681</span>          * An error stating the active item within the currently open After
<span class='line'>682</span>          * Effects file cannot be found.
<span class='line'>683</span>          * @type {String}
<span class='line'>684</span>          */</span><span class="WHIT">
<span class='line'>685</span> </span><span class="WHIT">        </span><span class="NAME">NO_ACTIVE_ITEM</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"The active item within the project could "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
<span class='line'>686</span> </span><span class="WHIT">            </span><span class="STRN">"not be found!"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>687</span> 
<span class='line'>688</span> </span><span class="WHIT">        </span><span class="COMM">/**
<span class='line'>689</span>          * An error stating that the active composition within the currently
<span class='line'>690</span>          * open project could not be found.
<span class='line'>691</span>          * @type {String}
<span class='line'>692</span>          */</span><span class="WHIT">
<span class='line'>693</span> </span><span class="WHIT">        </span><span class="NAME">NO_ACTIVE_COMP</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"The active composition within the "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
<span class='line'>694</span> </span><span class="WHIT">            </span><span class="STRN">"project could not be found!"</span><span class="WHIT">
<span class='line'>695</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>696</span> </span><span class="WHIT">    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>697</span> </span><span class="PUNC">}</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>698</span> </span></pre></body></html>